Integrand size = 20, antiderivative size = 127 \[ \int (c+d x)^2 \csc (a+b x) \sec (a+b x) \, dx=-\frac {2 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}+\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^2}-\frac {d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}+\frac {d^2 \operatorname {PolyLog}\left (3,e^{2 i (a+b x)}\right )}{2 b^3} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4504, 4268, 2611, 2320, 6724} \[ \int (c+d x)^2 \csc (a+b x) \sec (a+b x) \, dx=-\frac {2 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}+\frac {d^2 \operatorname {PolyLog}\left (3,e^{2 i (a+b x)}\right )}{2 b^3}+\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^2} \]
[In]
[Out]
Rule 2320
Rule 2611
Rule 4268
Rule 4504
Rule 6724
Rubi steps \begin{align*} \text {integral}& = 2 \int (c+d x)^2 \csc (2 a+2 b x) \, dx \\ & = -\frac {2 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {(2 d) \int (c+d x) \log \left (1-e^{i (2 a+2 b x)}\right ) \, dx}{b}+\frac {(2 d) \int (c+d x) \log \left (1+e^{i (2 a+2 b x)}\right ) \, dx}{b} \\ & = -\frac {2 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}+\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^2}-\frac {\left (i d^2\right ) \int \operatorname {PolyLog}\left (2,-e^{i (2 a+2 b x)}\right ) \, dx}{b^2}+\frac {\left (i d^2\right ) \int \operatorname {PolyLog}\left (2,e^{i (2 a+2 b x)}\right ) \, dx}{b^2} \\ & = -\frac {2 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}+\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^2}-\frac {d^2 \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{2 b^3}+\frac {d^2 \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{2 b^3} \\ & = -\frac {2 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}+\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^2}-\frac {d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}+\frac {d^2 \operatorname {PolyLog}\left (3,e^{2 i (a+b x)}\right )}{2 b^3} \\ \end{align*}
Time = 0.74 (sec) , antiderivative size = 213, normalized size of antiderivative = 1.68 \[ \int (c+d x)^2 \csc (a+b x) \sec (a+b x) \, dx=\frac {-4 b^2 c^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )+4 b^2 c d x \log \left (1-e^{2 i (a+b x)}\right )+2 b^2 d^2 x^2 \log \left (1-e^{2 i (a+b x)}\right )-4 b^2 c d x \log \left (1+e^{2 i (a+b x)}\right )-2 b^2 d^2 x^2 \log \left (1+e^{2 i (a+b x)}\right )+2 i b d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )-2 i b d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )-d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )+d^2 \operatorname {PolyLog}\left (3,e^{2 i (a+b x)}\right )}{2 b^3} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 468 vs. \(2 (111 ) = 222\).
Time = 1.21 (sec) , antiderivative size = 469, normalized size of antiderivative = 3.69
method | result | size |
risch | \(-\frac {2 i d^{2} \operatorname {polylog}\left (2, {\mathrm e}^{i \left (x b +a \right )}\right ) x}{b^{2}}-\frac {2 i d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (x b +a \right )}\right ) x}{b^{2}}-\frac {2 i d c \operatorname {polylog}\left (2, {\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}+\frac {d^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) x^{2}}{b}+\frac {2 d^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}-\frac {d^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x^{2}}{b}-\frac {d^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{2 b^{3}}+\frac {d^{2} \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) x^{2}}{b}+\frac {2 d^{2} \operatorname {polylog}\left (3, {\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}+\frac {2 d c \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) x}{b}-\frac {2 c d \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x}{b}+\frac {2 d c \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) x}{b}-\frac {2 c d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b^{2}}+\frac {c^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right )}{b}-\frac {c^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b}+\frac {c^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b}+\frac {2 d c \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) a}{b^{2}}+\frac {i d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x}{b^{2}}+\frac {i c d \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{b^{2}}-\frac {2 i d c \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}-\frac {d^{2} \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) a^{2}}{b^{3}}+\frac {d^{2} a^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b^{3}}\) | \(469\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1098 vs. \(2 (107) = 214\).
Time = 0.32 (sec) , antiderivative size = 1098, normalized size of antiderivative = 8.65 \[ \int (c+d x)^2 \csc (a+b x) \sec (a+b x) \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int (c+d x)^2 \csc (a+b x) \sec (a+b x) \, dx=\int \left (c + d x\right )^{2} \csc {\left (a + b x \right )} \sec {\left (a + b x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 599 vs. \(2 (107) = 214\).
Time = 0.42 (sec) , antiderivative size = 599, normalized size of antiderivative = 4.72 \[ \int (c+d x)^2 \csc (a+b x) \sec (a+b x) \, dx=-\frac {c^{2} {\left (\log \left (\sin \left (b x + a\right )^{2} - 1\right ) - \log \left (\sin \left (b x + a\right )^{2}\right )\right )} - \frac {2 \, a c d {\left (\log \left (\sin \left (b x + a\right )^{2} - 1\right ) - \log \left (\sin \left (b x + a\right )^{2}\right )\right )}}{b} + \frac {a^{2} d^{2} {\left (\log \left (\sin \left (b x + a\right )^{2} - 1\right ) - \log \left (\sin \left (b x + a\right )^{2}\right )\right )}}{b^{2}} + \frac {d^{2} {\rm Li}_{3}(-e^{\left (2 i \, b x + 2 i \, a\right )}) - 4 \, d^{2} {\rm Li}_{3}(-e^{\left (i \, b x + i \, a\right )}) - 4 \, d^{2} {\rm Li}_{3}(e^{\left (i \, b x + i \, a\right )}) - 2 \, {\left (-i \, {\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (-i \, b c d + i \, a d^{2}\right )} {\left (b x + a\right )}\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - 2 \, {\left (i \, {\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (i \, b c d - i \, a d^{2}\right )} {\left (b x + a\right )}\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - 2 \, {\left (-i \, {\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (-i \, b c d + i \, a d^{2}\right )} {\left (b x + a\right )}\right )} \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) - 2 \, {\left (i \, b c d + i \, {\left (b x + a\right )} d^{2} - i \, a d^{2}\right )} {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) - 4 \, {\left (-i \, b c d - i \, {\left (b x + a\right )} d^{2} + i \, a d^{2}\right )} {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) - 4 \, {\left (-i \, b c d - i \, {\left (b x + a\right )} d^{2} + i \, a d^{2}\right )} {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + {\left ({\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (b c d - a d^{2}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - {\left ({\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (b c d - a d^{2}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left ({\left (b x + a\right )}^{2} d^{2} + 2 \, {\left (b c d - a d^{2}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right )}{b^{2}}}{2 \, b} \]
[In]
[Out]
\[ \int (c+d x)^2 \csc (a+b x) \sec (a+b x) \, dx=\int { {\left (d x + c\right )}^{2} \csc \left (b x + a\right ) \sec \left (b x + a\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x)^2 \csc (a+b x) \sec (a+b x) \, dx=\int \frac {{\left (c+d\,x\right )}^2}{\cos \left (a+b\,x\right )\,\sin \left (a+b\,x\right )} \,d x \]
[In]
[Out]